[gd_resource type="Shader" format=2]

[resource]
code = "shader_type canvas_item;
uniform sampler2D normal;
uniform float height = 0;

void fragment(){

vec3 norm = texture(normal,UV).rgb;
NORMAL = vec3(norm.rg*vec2(-2.0,2.0)-vec2(-1.0,1.0),norm.b);
COLOR = texture(TEXTURE,UV)*vec4(0.25,0.25,0.25,1.0);
}
void light(){
vec3 light_vec = -normalize(vec3(-LIGHT_VEC.x,-LIGHT_VEC.y,height-LIGHT_HEIGHT));

vec3 n = normalize(NORMAL);

float dp = dot(normalize(NORMAL),light_vec);
LIGHT = 1.25*vec4(vec3(dp),1.0)*COLOR*LIGHT_COLOR;
}
"
